<?php
include '../Banner/sidhuvud.php';
include"../Huvudmeny/index.php";
?>
<html>
<B>Fyll i följande information om dig själv!</B>

<center><form method="post">
Användarnamn: <input type="text" name="anvandarnamn"><br>
E-Mail: <input type="text" name="email"><br>
Stad: <input type="text" name="stad"><br>
Lösenord: <input type="text" name="losenord"><br>
<input type="Submit" value="Registrera!">

</form>
 </center>


<?php
//include '../UploadTest/uploader/upload.form.php';
//echo '<input type="Submit" value="Registrera!">
//</form>
//</html>';


$hostname="localhost";
$username="root";
$password="";
$database="db_dinkonst";

//Connnects to database
mysql_connect($hostname,$username,$password);
mysql_select_db($database) or die( "Unable to select database");


$anvandarnamn=$_POST['anvandarnamn'];
$email=$_POST['email'];
$stad=$_POST['stad'];
$losenord=$_POST['losenord'];



//To prevent SQL injection
$anvandarnamn = stripslashes($anvandarnamn);
$email = stripslashes($email);
$stad = stripslashes($stad);
$losenord = stripslashes($losenord);



$query = "INSERT INTO users VALUES ('0','$anvandarnamn','$email','$stad','$losenord','')";
mysql_query($query);


mysql_close();
include '../Banner/sidfot.php';

?>


